{extend  name="manage@public/layout" /}
{block name="style"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>职务列表</h5>
                        
                        <div class="ibox-tools">
                            <h5 style="margin:-5px 5px 0px !important;">
                                <button onclick="modaldemo(0)" style="padding:4px;margin-bottom:0 !important" type="button" class="btn btn-primary btn-xs">添加职务</button>
                            </h5>
                            <a class="collapse-link" onclick="location.replace(location.href);">
                                <i class="fa fa-refresh"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>职务名称</th>
                                        <th>更新时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                   {volist name="role" id="vo"}
                                    <tr>
                                        <td>{$vo.id}</td>
                                        <td>{$vo.role_name}</td>
                                        <td>{$vo.create_time}</td>
                                        <td>
                                            {notin  name="$vo.id" value='1'}
                                            <button onClick="modaldemo({$vo.id})" type="button" class="btn btn-sm btn-white"><i class="fa fa-edit"></i>&nbsp;编辑</button>
                                            <a style="color: #1ab394;border: 1px solid #1ab394;" class="btn btn-white btn-sm" href="{:url('/manage/roleEdit',['pid'=>$vo.id])}" style="color: #999c9e;"><i class="fa fa-edit"></i> 编辑权限</a>&nbsp;&nbsp;
                                            {else /}
                                            <span style="cursor:not-allowed;" class="btn btn-white btn-sm" style="color: #999c9e;"><i class="fa fa-ban"></i> 暂无操作</span>&nbsp;&nbsp;
                                            {/notin}
                                        </td>
                                    </tr>
                                    {/volist}
                                </tbody>
                            </table>
                            <div style="float:right;" class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                <ul class="pagination">
                                    
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> 
    <!-- 弹框 --->
        <div id="modal-demo" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
            <div class="modal-dialog">
                <div class="modal-content radius">
                    <div class="modal-header">
                        <h3 class="modal-title" id= "title">添加职务</h3>
                        <a class="close" data-dismiss="modal" aria-hidden="true" href="javascript:void();">×</a>
                    </div>
                <div class="modal-content radius">
                    <div class="modal-body">
                        <div class="form-group">
                            <input type="hidden" name="id" id="id" class="form-control">
                            <label class="col-sm-2 control-label">公司</label>
                            <div class="col-sm-7" id="company">
                                
                            </div>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">职务名称</label>
                            <div class="col-sm-7">
                                <input type="text" placeholder="请输入职务名称" name="role_name" id="role_name" class="form-control">
                            </div>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">级别</label>
                            <div class="col-sm-7" id="getlevel">
                               
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-primary btn-account ">确定</button>
                        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
                    </div>
                </div>
            </div>
            </div>
        </div>
        <!--  end --->

    {/block}
    {block name="script"}
    <script src="/static/js/admin/position.js?v=1.5"></script>
    {/block}